{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b038f464-733a-40ac-a3ca-dfc48a7a1ab3",
   "metadata": {},
   "source": [
    "# Setup Environment for polite-guard tutorials\n",
    "\n",
    "The command below will create virtual environment, install packages dependencies and creates a ipykernel for running polite-guard Jupyter Notebooks."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ecbb0339-b7ad-4695-a344-0f488d5f09a5",
   "metadata": {},
   "source": [
    "### Install uv and create virtual env + ipykernel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fbe90900-b172-4c99-af97-698106ded193",
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash\n",
    "curl -LsSf https://astral.sh/uv/install.sh | sh\n",
    "uv run ipython kernel install --user --env VIRTUAL_ENV $(pwd)/.venv --name=polite-guard"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b5bcc7af-49d6-48c0-82f3-c2b49d6a49c7",
   "metadata": {},
   "source": [
    "## Execute Notebooks for polite-guard tutorial\n",
    "\n",
    "Run the following notebooks by setting the Notebook kernel to \"polite-guard\" to do the following:\n",
    "- Synthetic Data Generation for polite-guard\n",
    "- Fine Tuning polite-guard Model\n",
    "- Run Python Example with polite-guard inference\n",
    "\n",
    "| Notebooks | Details |\n",
    "|---|---|\n",
    "|[data-generator.ipynb](../data-generator/data-generator.ipynb)| Generates Synthetic Data for polite-guard|\n",
    "|[fine-tune.ipynb](../fine-tuner/fine-tune.ipynb)|Finetune bert model with data generated to create polite-guard model|\n",
    "|[run_examples.ipynb](../code-samples/python-transformers/run_examples.ipynb)|Run Python example that uses the polite-guard model to do inference|"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "55f29a99-b655-47ba-b032-aaaae9f0e044",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
